package com.itheima.JingTaiDaiMa;


import jdk.internal.dynalink.beans.StaticClass;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

public class Student {
    private String name;
    private String age;
//需求，创建一个类对象，自动加载已存在的数据
    public Student() {

    }

    public Student(String name, String age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public static Map<String,String> method() {
        String[] arr={"1930","1934","1938","1950","1954",
                "1958","1962","1966","1970","1974","1978",
                "1982","1986","1990","1994","1998","2002","2006"};
        String[] arr1={"乌拉圭","意大利","意大利","乌拉圭","西德",
                "巴西","巴西", "英格兰","巴西","西德","阿根廷","意大利",
                "阿根廷","西德","巴西","法国","巴西","意大利"};

        TreeMap<String,String> tm=new TreeMap<String, String>();
        for (int i = 0; i < arr.length; i++) {
                tm.put(arr[i],arr1[i]);
        }
        return tm;
    }
}
